<template>
    <div>
        <a-modal
            :title="modalTitle"
            v-model="modalShow"
            @ok="onSubmit"
            :width="1000"
            okText="确认"
            cancelText="取消"
        >
            <LibsOrganizationemployee types="radio"></LibsOrganizationemployee>
        </a-modal>
    </div>
</template>

<script>
import dict from "../../views/dict.json";
import Bus from "../../utils/Bus";
import LibsCommonBasics from "libs-common-basics";
export default {
    data() {
        return {
            modalShow: false,
            codeDisabled: false,
            modalTitle: "",
            labelCol: { span: 7 },
            wrapperCol: { span: 16 },
            form: {},
            fileList: [],
        };
    },
    methods: {
        // 打开窗口
        openModal(data) {
            this.form = !!data ? data : {};
            this.modalTitle = "选择人员";
            this.codeDisabled = !!data;
            this.modalShow = true;
            this.InitTreeList();
            this.functionEmployee();
        },
        // 确定提交表单
        onSubmit() {
            Bus.$emit("employee", this.$store.state.ChooseEmployee.selectedRowData[0]);
            this.modalShow = false;
        },
        InitTreeList() {
            // debugger
            LibsCommonBasics.Utils.$emit("InitTreeList", "msg");
        },
        functionEmployee() {
            // Utils.$emit("employeevalue", "msg");
            LibsCommonBasics.Utils.$emit("employee", "msg");
        },
    },
};
</script>
